<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require 'config.inc.php';
require 'mylink.inc.php';
require 'core/google_api/GShareAPI.class.php';


error_reporting( E_ALL | E_STRICT );

MyLink::$default = new MyLink( DB_HOST, DB_USER, DB_PASS, DB_DB, DB_PORT,
        DB_CHARSET );

$GAPI = new GShareAPI( 'alejandro.gama@gmail.com', MyLink::$default,
        'repositorio' );

$GAPI->setPassword( 'agc021078' );

$GAPI->dailyRevision();
//if($GAPI->wasChanged('1Olk-c7IVVRTPNnoIEc2h4ecVqngGJ2y0IAQ-Oppy6UA')){
//  echo 'FUE ACTUALIZADO';
//}
//$GAPI->uploadAndUpdate('1Olk-c7IVVRTPNnoIEc2h4ecVqngGJ2y0IAQ-Oppy6UA');
//$GAPI->newDoc('/var/www/repositorio/config/BlasFerrer.doc', 'La cosa podria salir mejor');
//$GAPI->shareDoc('/var/www/repositorio/config/BlasFerrer.doc', GoogleAPI::PERMISSION_WRITER, 'joseluisgamacastro@gmail.com');
//$GAPI->unShareDocs(array('/var/www/repositorio/config/BlasFerrer.doc'));
//$GAPI->shareDoc('0B2WEqWMUWjjwOTMyY2MxYjMtOTlhMi00ZDE0LWFhOGItODQzOTYzMDA5OTY', GoogleAPI::PERMISSION_READER, 'joseluisgamacastro@gmail.com');

/*
  require 'GOAuth.class.php';
  $oauth=new GOAuth('76748848756.apps.googleusercontent.com','yfZGM3sxAA-SWbZ2dgREDRWQ');

  $valores=$oauth->evaluate();


  header('Content-Type: text/html; Charset: UTF-8');
  echo $valores['name'].'<br />';
  echo $valores['given_name'].'<br />';
  echo $valores['family_name'].'<br />';
  echo $valores['email'].'<br />';
  echo $valores['verified_email'].'<br />';
  echo $valores['link'].'<br />';
  echo $valores['picture'].'<br />';
  echo $valores['gender'].'<br />';
  echo $valores['locale'].'<br />';
 */
?>
